-
Notifications
You must be signed in to change notification settings - Fork 47k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix ReactJSXElementValidator tests #29192
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Comparing: 6f90365...80a8cea Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: Expand to show
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And I thought I knew react, this is fascinating
I think it's still important that we assert that this code is skipped under the condition. https://github.com/facebook/react/blob/main/packages/react/src/jsx/ReactJSXElement.js#L1103 |
Summary
Noticed in #29088 that some of these test assertions rely on the fact that
Component
does not handlechildren
. This is likely a bug with the test since you wouldn't write components like this. Static type-checking would reject<Component>{children}</Component>
whenComponent
doesn't implement handling ofchildren
.How did you test this change?
yarn test --watch packages/react/src/__tests__/ReactJSXElementValidator-test.js